home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 41 / Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso / -seriously_amiga- / misc / notes / english / violinkey.rexx < prev   
OS/2 REXX Batch file  |  1999-04-19  |  50KB  |  1,645 lines

  1. /* subprogram for "Notes.pprx" */
  2.  
  3. signal on halt
  4. signal on break_c
  5. signal on break_e
  6. signal on break_d
  7. call ppm_SetStyle(N)
  8. call ppm_SetMagMode(250)
  9. call ppm_UpdateScreen()
  10.  
  11. noteneingabe:
  12.     sysform = "choosen notesystem:2"'0a'x"number of accident.:2"'0a'x"smallest noteworth:4"
  13.     systemform = ppm_Getform("Please give in ... (nothing=BREAK)", 3, sysform)
  14.     if systemform = '' then exit_msg("Break!")
  15.     parse var systemform systemart '0a'x vz '0a'x xgrd
  16.  
  17.     select
  18.      when systemart == '2' then zdist = 4
  19.      when systemart == '1v' then zdist = 2
  20.      when systemart == '1b' then zdist = 2
  21.      when systemart == '' then exit_msg("Break!")
  22.      when vz == '' then exit_msg("Break!")
  23.      otherwise noteneingabe()
  24.     end
  25.  
  26.     zdist2 = zdist-2
  27.  
  28.     select
  29.      when xgrd == '1' then xg =0.7
  30.      when xgrd == '2' then xg =1.4
  31.      when xgrd == '4' then xg =2.8
  32.      when xgrd == '8' then xg =5.6
  33.      when xgrd == '16' then xg =11.2
  34.      when xgrd == '' then exit_msg("Break!")
  35.      otherwise noteneingabe()
  36.     end
  37.  
  38.    /* pointmessure of the notes */
  39.    notepkt = 26
  40.    call ppm_SetJustification(0)
  41.  
  42.    secondbox=ppm_BoxNum()
  43.    
  44.    zz = 0   /* linecounter (german:Zeilenzähler) */
  45.    notex = 0
  46.    notey = 0
  47.    page = ppm_CurrentPage()
  48.  
  49. clickpos:
  50.    res = ppm_GetUserText(2, "Manual or align to a box ? m/b")
  51.  
  52.    if res == 'M' then res = 'm'
  53.    if res == 'B' then res = 'b'
  54. click:
  55.  select
  56.    when res == 'm' then
  57.      do
  58.        clickpos = ppm_GetClickPosition("Pleace click on the place, where I shall begin...")
  59.        if clickpos == 0 then
  60.            do
  61.            click()
  62.            end
  63.        else
  64.          do
  65.            notey = word(clickpos, 2)
  66.            notex = word(clickpos, 1)
  67.            if notex < (2+(vz*0.175)) then notex = (2+(vz*0.175))
  68.            xw = notex
  69.            yw = notey
  70.            if systemart ~= '2' then
  71.             do
  72.              if notey <= 3.3  then zz= 0   /* zz is linecounter */
  73.              if ((notey > 3.5)&(notey < 5.3)) then zz = 2
  74.              if ((notey > 5.5)&(notey < 7.3)) then zz = 4
  75.              if ((notey > 7.5)&(notey < 9.3)) then zz = 6
  76.              if ((notey > 9.5)&(notey < 11.3)) then zz = 8
  77.              if ((notey > 11.5)&(notey < 13.3)) then zz = 10
  78.              if ((notey > 13.5)&(notey < 15.3)) then zz = 12
  79.              if ((notey > 15.5)&(notey < 17.3)) then zz = 14
  80.              if ((notey > 17.5)&(notey < 19.3)) then zz = 16
  81.              if ((notey > 19.5)&(notey < 21.3)) then zz = 18
  82.              if ((notey > 21.5)&(notey < 23.3)) then zz = 20
  83.              if ((notey > 23.5)&(notey < 25.3)) then zz = 22
  84.              if notey > 25.3 then noteneingabe()
  85.             end
  86.            else
  87.             do
  88.               if notey <= 3.3  then zz= 0   /* zz ist ZeilenZähler */
  89.               if ((notey > 3.5)&(notey < 5.3)) then zz = 4
  90.               if ((notey > 5.5)&(notey < 11.3)) then zz = 8
  91.               if ((notey > 11.5)&(notey < 15.3)) then zz = 12
  92.               if ((notey > 15.5)&(notey < 19.3)) then zz = 16
  93.               if ((notey > 19.5)&(notey < 23.3)) then zz = 20
  94.               if notey > 25.3 then noteneingabe()
  95.             end
  96.          end
  97.  
  98.      end
  99.    when res == 'b' then
  100. clickb:
  101.      do
  102.         clickbox = ppm_ClickOnBox("Pleace click on a box, where I shall work away ...")
  103.         if clickbox == '' then clickb()
  104.         pos = ppm_GetBoxPosition(clickbox)
  105.         notex = word(pos, 1)
  106.         notey = word(pos, 2)
  107.         xw = notex
  108.         if notex <= 1 then noteneingabe()
  109.         yw = notey
  110.         secondbox = ppm_BoxAtPosn(notex, notey, page)
  111.         if systemart ~= '2' then
  112.             do
  113.              if notey <= 3.3  then zz= 0   /* zz ist ZeilenZähler */
  114.              if ((notey > 3.5)&(notey < 5.3)) then zz = 2
  115.              if ((notey > 5.5)&(notey < 7.3)) then zz = 4
  116.              if ((notey > 7.5)&(notey < 9.3)) then zz = 6
  117.              if ((notey > 9.5)&(notey < 11.3)) then zz = 8
  118.              if ((notey > 11.5)&(notey < 13.3)) then zz = 10
  119.              if ((notey > 13.5)&(notey < 15.3)) then zz = 12
  120.              if ((notey > 15.5)&(notey < 17.3)) then zz = 14
  121.              if ((notey > 17.5)&(notey < 19.3)) then zz = 16
  122.              if ((notey > 19.5)&(notey < 21.3)) then zz = 18
  123.              if ((notey > 21.5)&(notey < 23.3)) then zz = 20
  124.              if ((notey > 23.5)&(notey < 25.3)) then zz = 22
  125.              if notey > 25.3 then noteneingabe()
  126.              if zz > 2 then
  127.              do
  128.               if xw == 3 then xw = 2.5
  129.              end
  130.             end
  131.         else
  132.             do
  133.              if notey <= 3.3  then zz= 0
  134.              if ((notey > 5.5)&(notey < 7.3)) then zz = 4
  135.              if ((notey > 9.5)&(notey < 11.3)) then zz = 8
  136.              if ((notey > 13.5)&(notey < 15.3)) then zz = 12
  137.              if ((notey > 17.5)&(notey < 19.3)) then zz = 16
  138.              if ((notey > 21.5)&(notey < 23.3)) then zz = 20
  139.              if zz > 4 then
  140.              do
  141.               if xw == 3 then xw = 2.5
  142.              end
  143.             end
  144.      end
  145.    otherwise clickpos()
  146.  end
  147.  
  148.  
  149.    /* pointerbox */
  150.  
  151.    zbid = ppm_CreateBox(notex, zz+0.5, 0.3, 1, 0)
  152.    call ppm_SetSize(26)
  153.    zbn = ppm_GetBoxName(zbid)
  154.    call ppm_TextIntoBox(zbn, '5')
  155.  
  156.  
  157. notenwert:
  158.  
  159.    do forever
  160.            cr = '0a'x
  161.            form = "worth name ['n'at.]"
  162.            call ppm_SetBoxPosition(zbid, notex, zz+0.5)
  163.            call ppm_UpdateScreen()
  164.            eingabe = ppm_GetForm("Please give in for the notes ...(nothing=BREAK )", 7, form)
  165.            if eingabe = '' then
  166.            do
  167.             call ppm_DeleteBox(zbid)
  168.             exit_msg("Break")
  169.            end
  170.            nw = word(eingabe, 1)
  171.            nn = word(eingabe, 2)
  172.            if nw == 'P' then nw = 'p'
  173.            al = word(eingabe, 3)
  174.            if al == 'N' then al = 'n'
  175.            IF nw == 'D' then nw = 'd'
  176.            if nw == 'C' then nw = 'c'
  177.            if nw == 'L' then nw = 'l'
  178.            if nw == 'M' then nw = 'm'
  179.            if nn == 'L' then nn = 'l'
  180.            if nw == "NEW" then nw = "new"
  181.            if nw == "END" then nw = "end"
  182.  
  183.       select
  184.         when nn=='GB2' then nn = 'Gb2'
  185.         when nn=='BB2' then nn = 'Bb2'
  186.         when nn=='AB2' then nn = 'Ab2'
  187.         when nn=='DB3' then nn = 'Db3'
  188.         when nn=='EB3' then nn = 'Eb3'
  189.         when nn=='GB3' then nn = 'Gb3'
  190.         when nn=='AB3' then nn = 'Ab3'
  191.         when nn=='BB3' then nn = 'Bb3'
  192.         when nn=='DB4' then nn = 'Db4'
  193.         when nn=='EB4' then nn = 'Eb4'
  194.         when nn=='GB4' then nn = 'Gb4'
  195.         when nn=='AB4' then nn = 'Ab4'
  196.         when nn=='BB4' then nn = 'Bb4'
  197.         when nn=='DB5' then nn = 'Db5'
  198.         when nn=='EB5' then nn = 'Eb5'
  199.         otherwise NOP
  200.       end
  201.  
  202.         /* x-distance of the notes */
  203.     select
  204.       when nw=='s' then
  205.           do
  206.           xw = xg/16
  207.           nw='x'
  208.           yv = 0
  209.           end
  210.       when nw=='S' then
  211.           do
  212.           xw = xg/16
  213.           nw='X'
  214.           yv = 0.47
  215.           end
  216.       when nw=='e' then
  217.           do
  218.           xw = xg/8
  219.           nw='e'
  220.           yv = 0
  221.           end
  222.       when nw=='E' then
  223.           do
  224.           xw = xg/8
  225.           nw='E'
  226.           yv = 0.47
  227.           end
  228.       when nw=='q' then
  229.           do
  230.           xw = xg/4
  231.           nw='q'
  232.           yv = 0
  233.           end
  234.       when nw=='Q' then
  235.           do
  236.           xw = xg/4
  237.           nw='Q'
  238.           yv = 0.47
  239.           end
  240.       when nw=='h' then
  241.           do
  242.           xw = xg/2
  243.           yv = 0
  244.           end
  245.       when nw=='H' then
  246.           do
  247.           xw = xg/2
  248.           yv = 0.47
  249.           end
  250.       when nw=='w' then
  251.           do
  252.           xw = xg
  253.           nw='w'
  254.           yv = 0
  255.           end
  256.       when nw=='W' then
  257.           do
  258.           xw = xg
  259.           nw='W'
  260.           yv = 0.47
  261.           end
  262.  
  263.      /* 2 eigth- or sixteenthnotes join together by a beam(fat line) */
  264.  
  265.       when nw=='m' then
  266.           do
  267.             call ppm_SetEdit(secondbox)
  268.             call ppm_SelectBoxText()
  269.             boxtxt=ppm_GetBlockText(0)
  270.             btb=word(boxtxt,1)
  271.             select
  272.                 when btb=='e' then
  273.                 do
  274.                   fbx=0.45
  275.                   fby=0.12
  276.                   newtxt='q'
  277.                   balk=1
  278.                 end
  279.                 when btb=='E' then
  280.                 do
  281.                   fbx=0.145
  282.                   fby=0.73
  283.                   newtxt='Q'
  284.                   balk=1
  285.                 end
  286.                 when btb=='x' then
  287.                 do
  288.                   fbx=0.45
  289.                   fby=0.12
  290.                   newtxt='q'
  291.                   balk=2
  292.                 end
  293.                 when btb=='X' then
  294.                 do
  295.                   fbx=0.145
  296.                   fby=0.73
  297.                   newtxt='Q'
  298.                   balk=2
  299.                 end
  300.                 otherwise
  301.                 do
  302.                     call ppm_EndEdit()
  303.                     call ppm_Inform(1,"Only eight or sixteenth are able to merge!!!","OK")
  304.                     notenwert()
  305.                 end
  306.             end
  307.             call ppm_Cut()
  308.             call ppm_UnBlock()
  309.             call ppm_EndEdit()
  310.             call ppm_TextIntoBox(secondbox, newtxt)
  311.             boxposb=ppm_GetBoxPosition(secondbox)
  312.             boxbx=word(boxposb,1)
  313.             boxby=word(boxposb,2)
  314.             if boxbosbx <= 3 then
  315.             do
  316.                 call ppm_Inform(1,"Merge not accross the lineend !!!","OK")
  317.                 notenwert()
  318.             end
  319.             do forever
  320.               info = ppm_GetBoxInfo(firstbox)
  321.               type = word(info,1)
  322.               if type ~= "Text" then firstbox = firstbox - 1
  323.               else break
  324.             end
  325.             curbox=ppm_ArtFirstBox(firstbox)
  326.             call ppm_SetEdit(curbox)
  327.             call ppm_SelectBoxText()
  328.             boxtxt=ppm_GetBlockText(0)
  329.             bta=word(boxtxt,1)
  330.             select
  331.                 when bta=='e' then
  332.                 do
  333.                   fax=0.39
  334.                   fay=0.12
  335.                   newtxt='q'
  336.                 end
  337.                 when bta=='E' then
  338.                 do
  339.                   fax=0.085
  340.                   fay=0.73
  341.                   newtxt='Q'
  342.                 end
  343.                 when bta=='x' then
  344.                 do
  345.                   fax=0.39
  346.                   fay=0.12
  347.                   newtxt='q'
  348.                 end
  349.                 when bta=='X' then
  350.                 do
  351.                   fax=0.085
  352.                   fay=0.73
  353.                   newtxt='Q'
  354.                 end
  355.                 otherwise
  356.                 do
  357.                     call ppm_EndEdit()
  358.                     call ppm_Inform(1,"Only eight or sixteenth are able to merge!!!","OK")
  359.                     notenwert()
  360.                 end
  361.             end
  362.             if bta ~= btb then
  363.             do
  364.                 call ppm_EndEdit()
  365.                 call ppm_Inform(1,"Only same notes are able to merge!!!","OK")
  366.                 call ppm_SetEdit(secondbox)
  367.                 call ppm_SelectBoxText()
  368.                 call ppm_Cut()
  369.                 call ppm_EndEdit()
  370.                 call ppm_TextIntoBox(secondbox, btb)
  371.                 notenwert()
  372.             end
  373.             call ppm_Cut()
  374.             call ppm_UnBlock()
  375.             call ppm_EndEdit()
  376.             call ppm_TextIntoBox(curbox, newtxt)
  377.             boxposa=ppm_GetBoxPosition(curbox)
  378.             boxax=word(boxposa,1)
  379.             boxay=word(boxposa,2)
  380.             call ppm_SetLineWeight(3)
  381.             do forever
  382.               if balk == 0 then break
  383.               lineid=ppm_DrawLine(boxax+fax, boxay+fay, boxbx+fbx, boxby+fby)
  384.               call ppm_SetBoxOffset(lineid, -0.08, 0)
  385.               measure=ppm_GetBoxSize(lineid)
  386.               linex = word(measure,1)
  387.               liney = word(measure,2)
  388.               call ppm_SetBoxSize(lineid, linex - 0.155, liney)
  389.               if bta == 'x' then
  390.               do
  391.                 fay = fay + 0.2
  392.                 fby = fby + 0.2
  393.               end
  394.               if bta == 'X' then
  395.               do
  396.                 fay = fay - 0.2
  397.                 fby = fby - 0.2
  398.               end
  399.               balk = balk - 1
  400.             end
  401.             call ppm_ArtFirstBox(secondbox)
  402.             call ppm_SetLineWeight(0.5)
  403.           end
  404.  
  405.  
  406.      /*point after the note */
  407.  
  408.       when nw == 'pt' then
  409.           do
  410.             if notex < 3 then
  411.             do
  412.               notex = bakx
  413.               zz = zz - zdist
  414.               call ppm_SetSize(25)
  415.               box#id = ppm_CreateBox(notex+0.4, yw+zz+0.26-yv, 0.3, 0.9, 0)
  416.               call ppm_SetSize(20)
  417.               call ppm_TextIntoBox(box#id, 'd')
  418.             end
  419.             else
  420.             do
  421.               call ppm_SetSize(25)
  422.               box#id = ppm_CreateBox(notex-xw+0.4, yw+zz+0.26-yv, 0.3, 0.9, 0)
  423.               call ppm_SetSize(20)
  424.               call ppm_TextIntoBox(box#id, 'd')
  425.             end
  426.            select
  427.                when nn == '1' then
  428.                do
  429.                xw = xg
  430.                notex = notex+xw
  431.                end
  432.                when nn == '2' then
  433.                do
  434.                xw = xg/2
  435.                notex = notex+xw
  436.                end
  437.                when nn == '4' then
  438.                do
  439.                xw = xg/4
  440.                notex = notex+xw
  441.                end
  442.                when nn == '8' then
  443.                do
  444.                xw = xg/8
  445.                notex = notex+xw
  446.                end
  447.                when nn == '16' then
  448.                do
  449.                xw  = xg/16
  450.                notex = notex+xw
  451.                end
  452.                when nn == 'l' then
  453.                do
  454.                xw  = 0.2
  455.                notex = notex+xw
  456.                end
  457.                otherwise notenwert()
  458.            end
  459.            if notex >=18.7 then
  460.                do
  461.                  notex = (2+(vz*0.175))
  462.                  zz = zz + zdist
  463.                end
  464.            px = notex - 4
  465.            py = zz-1
  466.            if px < 0 then px = 0
  467.            call ppm_SetPagePosition(px, py+2)
  468.            notenwert()
  469.           end
  470.  
  471.       when nw == 'PT' then
  472.           do
  473.             if notex < 3 then
  474.             do
  475.               notex = bakx
  476.               zz = zz - zdist
  477.               call ppm_SetSize(25)
  478.               box#id = ppm_CreateBox(notex+0.4, yw+zz+0.26-yv, 0.3, 0.9, 0)
  479.               call ppm_SetSize(20)
  480.               call ppm_TextIntoBox(box#id, 'd')
  481.             end
  482.             else
  483.             do
  484.               call ppm_SetSize(25)
  485.               box#id = ppm_CreateBox(notex-xw+0.4, yw+zz+0.26-yv, 0.3, 0.9, 0)
  486.               call ppm_SetSize(20)
  487.               call ppm_TextIntoBox(box#id, 'd')
  488.             end
  489.            select
  490.                when nn == '1' then
  491.                do
  492.                xw = xg
  493.                notex = notex+xw
  494.                end
  495.                when nn == '2' then
  496.                do
  497.                xw = xg/2
  498.                notex = notex+xw
  499.                end
  500.                when nn == '4' then
  501.                do
  502.                xw = xg/4
  503.                notex = notex+xw
  504.                end
  505.                when nn == '8' then
  506.                do
  507.                xw = xg/8
  508.                notex = notex+xw
  509.                end
  510.                when nn == '16' then
  511.                do
  512.                xw  = xg/16
  513.                notex = notex+xw
  514.                end
  515.                when nn == 'l' then
  516.                do
  517.                xw  = 0.2
  518.                notex = notex+xw
  519.                end
  520.                otherwise notenwert()
  521.            end
  522.            if notex >=18.7 then
  523.                do
  524.                  notex = (2+(vz*0.175))
  525.                  zz = zz + zdist
  526.                end
  527.            px = notex - 4
  528.            py = zz-1
  529.            if px < 0 then px = 0
  530.            call ppm_SetPagePosition(px, py+2)
  531.            notenwert()
  532.           end
  533.  
  534.      /* delete */
  535.       when nw == 'd' then
  536.           do
  537.            secondbox=firstbox
  538.            oldpos = notex
  539.            thisbox = ppm_BoxNum()
  540.            if thisbox == zbid then
  541.              do
  542.              ppm_Inform(1, "Nothing to delete!","OK")
  543.              notenwert()
  544.              end
  545.            lpos= ppm_GetBoxPosition()
  546.            notex = word(lpos, 1)
  547.            call ppm_DeleteBox()
  548.            diff = oldpos - notex
  549.            if diff<0 then notenwert()
  550.            if (diff < 0.3)&(diff > 0.1) then notex = notex + 0.23
  551.            py    = zz - 1
  552.            px = notex - 4
  553.            if px < 0 then px = 0
  554.            call ppm_SetPagePosition(px, py+2)
  555.            notenwert()
  556.           end
  557.  
  558.       /* barline */
  559.       when nw == 'l' then
  560.           do
  561.            call ppm_SetLineWeight(0.25)
  562.            call ppm_DrawLine(notex, 2+zz, notex, 2.8+zz)
  563.            notex = notex+0.2
  564.           end
  565.  
  566.      /* Pausen */
  567.       when nw == 'p' then
  568.         do
  569. pausenwert:
  570.            x = notex
  571.            select
  572.                when nn== '1' then do
  573.  
  574.                    y = 2.28+zz
  575.                    call ppm_SetLineWeight(4)
  576.                    call ppm_DrawLine(x, y, x+0.4, y)
  577.                    call ppm_SetLineWeight(0.25)
  578.                    xw = xg
  579.                    notex = notex+xw
  580.                end
  581.  
  582.                when nn== '2' then do
  583.  
  584.                    y = 2.32+zz
  585.                    call ppm_SetLineWeight(4)
  586.                    call ppm_DrawLine(x, y, x+0.4, y)
  587.                    call ppm_SetLineWeight(0.25)
  588.                    xw = xg/2
  589.                    notex = notex+xw
  590.                end
  591.  
  592.                when nn== '4' then do
  593.  
  594.                    y = 2.07+zz
  595.                    Pbox = ppm_CreateBox(x, y, 0.59, 0.86, 0)
  596.                    boxnm = ppm_DocNextBox(Pbox)
  597.                    call ppm_DeleteContents(boxnm)
  598.                    call ppm_ImportGraphic(boxnm, 'Genies:note_pause/quarterpause', pause)
  599.                    xw = xg/4
  600.                    notex = notex+xw
  601.                end
  602.  
  603.                when nn== '8' then do
  604.  
  605.                    y = 2.21+zz
  606.                    Pbox = ppm_CreateBox(x, y, 0.27, 0.42, 0)
  607.                    boxnm = ppm_DocNextBox(Pbox)
  608.                    call ppm_DeleteContents(boxnm)
  609.                    call ppm_ImportGraphic(boxnm, 'Genies:note_pause/eighthpause', pause)
  610.                    xw = xg/8
  611.                    notex = notex+xw
  612.                end
  613.  
  614.                when nn== '16' then do
  615.  
  616.                    y = 2.21+zz
  617.                    Pbox = ppm_CreateBox(x, y, 0.27, 0.42, 0)
  618.                    boxnm = ppm_DocNextBox(Pbox)
  619.                    call ppm_DeleteContents(boxnm)
  620.                    call ppm_ImportGraphic(boxnm, 'Genies:note_pause/sixteenthpause', pause)
  621.                    xw = xg/16
  622.                    notex = notex+xw
  623.                end
  624.                otherwise notenwert()
  625.            end
  626.            if notex >=18.7 then
  627.                do
  628.                  notex = (2+(vz*0.175))
  629.                  zz = zz + zdist
  630.                end
  631.            px = notex - 4
  632.            py = zz-1
  633.            if px < 0 then px = 0
  634.            call ppm_SetPagePosition(px, py+2)
  635.            notenwert()
  636.         end
  637.  
  638.     /*spaces*/
  639.  
  640.       when nw == 'c' then
  641.         do
  642.           select
  643.  
  644.            when nn== '1' then
  645.                do
  646.                xw = xg
  647.                notex = notex+xw
  648.                end
  649.            when nn== '2' then
  650.                do
  651.                xw = xg/2
  652.                notex = notex+xw
  653.                end
  654.            when nn== '4' then
  655.                do
  656.                xw = xg/4
  657.                notex = notex+xw
  658.                end
  659.            when nn== '8' then
  660.                do
  661.                xw = xg/8
  662.                notex = notex+xw
  663.                end
  664.            when nn== '16' then
  665.                do
  666.                xw = xg/16
  667.                notex = notex+xw
  668.                end
  669.            when nn == 'l' then
  670.                do
  671.                xw  = 0.2
  672.                notex = notex+xw
  673.                end
  674.            otherwise notenwert()
  675.           end
  676.            if notex >=18.7 then
  677.                do
  678.                  notex = (2+(vz*0.175))
  679.                  zz = zz + zdist
  680.                end
  681.            px = notex - 4
  682.            py = zz-1
  683.            if px < 0 then px = 0
  684.            call ppm_SetPagePosition(px, py+2)
  685.            notenwert()
  686.         end
  687.  
  688.       when nw == 'new' then
  689.         do
  690.            call ppm_DeleteBox(zbid)
  691.            clickpos()
  692.         end
  693.       otherwise notenwert()
  694.     end
  695.  
  696.  
  697.      /* y-distance of the notes - notestem to top */
  698.  
  699.         call ppm_SetLineWeight(0.25)
  700.  
  701.       select
  702.         when nn=='f#5'  then
  703.         do
  704.             yw = 0.645
  705.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  706.             call ppm_SetSize(20)
  707.             call ppm_TextIntoBox(box#id, 's')
  708.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  709.             call ppm_DrawLine(notex, zz+1.6, (notex+0.4), zz+1.6)
  710.             call ppm_DrawLine(notex, zz+1.4, (notex+0.4), zz+1.4)
  711.         end
  712.         when nn=='f5'  then
  713.         do
  714.             yw = 0.645
  715.             if al == 'n' then call auflhoch()
  716.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  717.             call ppm_DrawLine(notex, zz+1.6, (notex+0.4), zz+1.6)
  718.             call ppm_DrawLine(notex, zz+1.4, (notex+0.4), zz+1.4)
  719.         end
  720.         when nn=='e5'  then
  721.         do
  722.             yw = 0.745
  723.             if al == 'n' then call auflhoch()
  724.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  725.             call ppm_DrawLine(notex, zz+1.6, (notex+0.4), zz+1.6)
  726.             call ppm_DrawLine(notex, zz+1.4, (notex+0.4), zz+1.4)
  727.         end
  728.         when nn=='eb5'  then
  729.         do
  730.             yw = 0.745
  731.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  732.             call ppm_SetSize(20)
  733.             call ppm_TextIntoBox(box#id, 'f')
  734.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  735.             call ppm_DrawLine(notex, zz+1.6, (notex+0.4), zz+1.6)
  736.             call ppm_DrawLine(notex, zz+1.4, (notex+0.4), zz+1.4)
  737.         end
  738.         when nn=='d#5'  then
  739.         do
  740.             yw = 0.845
  741.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  742.             call ppm_SetSize(20)
  743.             call ppm_TextIntoBox(box#id, 's')
  744.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  745.             call ppm_DrawLine(notex, zz+1.6, (notex+0.4), zz+1.6)
  746.         end
  747.         when nn=='d5'  then
  748.         do
  749.             yw = 0.845
  750.             if al == 'n' then call auflhoch()
  751.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  752.             call ppm_DrawLine(notex, zz+1.6, (notex+0.4), zz+1.6)
  753.         end
  754.         when nn=='db5'  then
  755.         do
  756.             yw = 0.845
  757.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  758.             call ppm_SetSize(20)
  759.             call ppm_TextIntoBox(box#id, 'f')
  760.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  761.             call ppm_DrawLine(notex, zz+1.6, (notex+0.4), zz+1.6)
  762.         end
  763.         when nn=='c#5'  then
  764.         do
  765.             yw = 0.945
  766.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  767.             call ppm_SetSize(20)
  768.             call ppm_TextIntoBox(box#id, 's')
  769.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  770.             call ppm_DrawLine(notex, zz+1.6, (notex+0.4), zz+1.6)
  771.         end
  772.         when nn=='c5'  then
  773.         do
  774.             yw = 0.945
  775.             if al == 'n' then call auflhoch()
  776.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  777.             call ppm_DrawLine(notex, zz+1.6, (notex+0.4), zz+1.6)
  778.         end
  779.  
  780.         when nn=='b4'  then
  781.         do
  782.             yw = 1.045
  783.             if al == 'n' then call auflhoch()
  784.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  785.         end
  786.  
  787.         when nn=='bb4'  then
  788.         do
  789.             yw = 1.045
  790.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  791.         end
  792.  
  793.         when nn=='a#4' then
  794.         do
  795.             yw = 1.145
  796.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  797.             call ppm_SetSize(20)
  798.             call ppm_TextIntoBox(box#id, 's')
  799.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  800.         end
  801.  
  802.         when nn=='a4'  then
  803.         do
  804.             yw = 1.145
  805.             if al == 'n' then call auflhoch()
  806.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  807.         end
  808.  
  809.         when nn=='ab4' then
  810.         do
  811.             yw = 1.145
  812.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  813.             call ppm_SetSize(20)
  814.             call ppm_TextIntoBox(box#id, 'f')
  815.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  816.         end
  817.  
  818.         when nn=='g#4' then
  819.         do
  820.             yw = 1.245
  821.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  822.             call ppm_SetSize(20)
  823.             call ppm_TextIntoBox(box#id, 's')
  824.         end
  825.         when nn=='g4'  then
  826.         do
  827.             yw = 1.245
  828.             if al == 'n' then call auflhoch()
  829.         end
  830.         when nn=='gb4' then
  831.         do
  832.             yw = 1.245
  833.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  834.             call ppm_SetSize(20)
  835.             call ppm_TextIntoBox(box#id, 'f')
  836.         end
  837.         when nn=='f#4' then
  838.         do
  839.             yw = 1.345
  840.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  841.             call ppm_SetSize(20)
  842.             call ppm_TextIntoBox(box#id, 's')
  843.         end
  844.         when nn=='f4'  then
  845.         do
  846.             yw = 1.345
  847.             if al == 'n' then call auflhoch()
  848.         end
  849.         when nn=='e#4' then
  850.         do
  851.             yw = 1.445
  852.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  853.             call ppm_SetSize(20)
  854.             call ppm_TextIntoBox(box#id, 's')
  855.         end
  856.         when nn=='e4'  then
  857.         do
  858.             yw = 1.445
  859.             if al == 'n' then call auflhoch()
  860.         end
  861.         when nn=='eb4' then
  862.         do
  863.             yw = 1.445
  864.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  865.             call ppm_SetSize(20)
  866.             call ppm_TextIntoBox(box#id, 'f')
  867.         end
  868.         when nn=='d#4' then
  869.         do
  870.             yw = 1.545
  871.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  872.             call ppm_SetSize(20)
  873.             call ppm_TextIntoBox(box#id, 's')
  874.         end
  875.         when nn=='d4'  then
  876.         do
  877.             yw = 1.545
  878.             if al == 'n' then call auflhoch()
  879.         end
  880.         when nn=='db4' then
  881.         do
  882.             yw = 1.545
  883.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  884.             call ppm_SetSize(20)
  885.             call ppm_TextIntoBox(box#id, 'f')
  886.         end
  887.         when nn=='c#4' then
  888.         do
  889.             yw = 1.645
  890.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  891.             call ppm_SetSize(20)
  892.             call ppm_TextIntoBox(box#id, 's')
  893.         end
  894.         when nn=='c4'  then
  895.         do
  896.             yw = 1.645
  897.             if al == 'n' then call auflhoch()
  898.         end
  899.         when nn=='b3'  then
  900.         do
  901.             yw = 1.745
  902.             if al == 'n' then call auflhoch()
  903.         end
  904.         when nn=='bb3'  then
  905.         do
  906.             yw = 1.745
  907.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  908.             call ppm_SetSize(20)
  909.             call ppm_TextIntoBox(box#id, 'f')
  910.         end
  911.         when nn=='a#3' then
  912.         do
  913.             yw = 1.845
  914.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  915.             call ppm_SetSize(20)
  916.             call ppm_TextIntoBox(box#id, 's')
  917.         end
  918.         when nn=='a3'  then
  919.         do
  920.             yw = 1.845
  921.             if al == 'n' then call auflhoch()
  922.         end
  923.         when nn=='ab3' then
  924.         do
  925.             yw = 1.845
  926.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  927.             call ppm_SetSize(20)
  928.             call ppm_TextIntoBox(box#id, 'f')
  929.         end
  930.         when nn=='g#3' then
  931.         do
  932.             yw = 1.945
  933.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  934.             call ppm_SetSize(20)
  935.             call ppm_TextIntoBox(box#id, 's')
  936.         end
  937.         when nn=='g3'  then
  938.         do
  939.             yw = 1.945
  940.             if al == 'n' then call auflhoch()
  941.         end
  942.         when nn=='gb3' then
  943.         do
  944.             yw = 1.945
  945.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  946.             call ppm_SetSize(20)
  947.             call ppm_TextIntoBox(box#id, 'f')
  948.         end
  949.         when nn=='f#3' then
  950.         do
  951.             yw = 2.045
  952.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  953.             call ppm_SetSize(20)
  954.             call ppm_TextIntoBox(box#id, 's')
  955.         end
  956.         when nn=='f3'  then
  957.         do
  958.             yw = 2.045
  959.             if al == 'n' then call auflhoch()
  960.         end
  961.         when nn=='e#3' then
  962.         do
  963.             yw = 2.145
  964.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  965.             call ppm_SetSize(20)
  966.             call ppm_TextIntoBox(box#id, 's')
  967.         end
  968.         when nn=='e3'  then
  969.         do
  970.             yw = 2.145
  971.             if al == 'n' then call auflhoch()
  972.         end
  973.         when nn=='eb3' then
  974.         do
  975.             yw = 2.145
  976.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  977.             call ppm_SetSize(20)
  978.             call ppm_TextIntoBox(box#id, 'f')
  979.         end
  980.         when nn=='d#3' then
  981.         do
  982.             yw = 2.245
  983.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  984.             call ppm_SetSize(20)
  985.             call ppm_TextIntoBox(box#id, 's')
  986.         end
  987.         when nn=='d3'  then
  988.         do
  989.             yw = 2.245
  990.             if al == 'n' then call auflhoch()
  991.         end
  992.         when nn=='db3' then
  993.         do
  994.             yw = 2.245
  995.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  996.             call ppm_SetSize(20)
  997.             call ppm_TextIntoBox(box#id, 'f')
  998.         end
  999.  
  1000.         when nn=='c#3' then
  1001.         do
  1002.             yw = 2.345
  1003.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  1004.             call ppm_SetSize(20)
  1005.             call ppm_TextIntoBox(box#id, 's')
  1006.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1007.         end
  1008.  
  1009.         when nn=='c3'  then
  1010.         do
  1011.             yw = 2.345
  1012.             if al == 'n' then call auflhoch()
  1013.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1014.         end
  1015.  
  1016.         when nn=='b2'  then
  1017.         do
  1018.             yw = 2.445
  1019.             if al == 'n' then call auflhoch()
  1020.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1021.         end
  1022.  
  1023.         when nn=='bb2'  then
  1024.         do
  1025.             yw = 2.445
  1026.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  1027.             call ppm_SetSize(20)
  1028.             call ppm_TextIntoBox(box#id, 'f')
  1029.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1030.         end
  1031.  
  1032.         when nn=='a#2' then
  1033.         do
  1034.             yw = 2.545
  1035.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  1036.             call ppm_SetSize(20)
  1037.             call ppm_TextIntoBox(box#id, 's')
  1038.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1039.             call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1040.         end
  1041.  
  1042.         when nn=='a2'  then
  1043.         do
  1044.             yw = 2.545
  1045.             if al == 'n' then call auflhoch()
  1046.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1047.             call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1048.         end
  1049.  
  1050.         when nn=='ab2'  then
  1051.         do
  1052.             yw = 2.545
  1053.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  1054.             call ppm_SetSize(20)
  1055.             call ppm_TextIntoBox(box#id, 'f')
  1056.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1057.             call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1058.         end
  1059.  
  1060.         when nn=='g#2'  then
  1061.         do
  1062.             yw = 2.645
  1063.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  1064.             call ppm_SetSize(20)
  1065.             call ppm_TextIntoBox(box#id, 's')
  1066.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1067.             call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1068.         end
  1069.  
  1070.         when nn=='g2'  then
  1071.         do
  1072.             yw = 2.645
  1073.             if al == 'n' then call auflhoch()
  1074.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1075.             call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1076.         end
  1077.  
  1078.  
  1079.         when nn=='gb2'  then
  1080.         do
  1081.             yw = 2.645
  1082.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  1083.             call ppm_SetSize(20)
  1084.             call ppm_TextIntoBox(box#id, 'f')
  1085.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1086.             call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1087.         end
  1088.  
  1089.         when nn=='f#2'  then
  1090.         do
  1091.             yw = 2.745
  1092.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.32, 0.35, 0.75, 0)
  1093.             call ppm_SetSize(20)
  1094.             call ppm_TextIntoBox(box#id, 's')
  1095.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1096.             call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1097.             call ppm_DrawLine(notex, zz+3.4, (notex+0.4), zz+3.4)
  1098.         end
  1099.  
  1100.         when nn=='f2'  then
  1101.         do
  1102.             yw = 2.745
  1103.             if al == 'n' then call auflhoch()
  1104.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1105.             call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1106.             call ppm_DrawLine(notex, zz+3.4, (notex+0.4), zz+3.4)
  1107.         end
  1108.  
  1109.         when nn=='e2'  then
  1110.         do
  1111.             yw = 2.845
  1112.             if al == 'n' then call auflhoch()
  1113.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1114.             call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1115.             call ppm_DrawLine(notex, zz+3.4, (notex+0.4), zz+3.4)
  1116.         end
  1117.  
  1118.         when nn=='eb2'  then
  1119.         do
  1120.             yw = 2.845
  1121.             box#id = ppm_CreateBox(notex-0.23, yw+zz+0.21, 0.35, 0.75, 0)
  1122.             call ppm_SetSize(20)
  1123.             call ppm_TextIntoBox(box#id, 'f')
  1124.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1125.             call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1126.             call ppm_DrawLine(notex, zz+3.4, (notex+0.4), zz+3.4)
  1127.         end
  1128.  
  1129.         when nn=='d2'  then
  1130.         do
  1131.             yw = 2.945
  1132.             if al == 'a' then call auflhoch()
  1133.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1134.             call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1135.             call ppm_DrawLine(notex, zz+3.4, (notex+0.4), zz+3.4)
  1136.             call ppm_DrawLine(notex, zz+3.6, (notex+0.4), zz+3.6)
  1137.         end
  1138.  
  1139.  
  1140.     /* y-distance of the notes- notestem to bottom */
  1141.  
  1142.         when nn=='F#5'  then
  1143.         do
  1144.             yw = 1.12
  1145.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  1146.             call ppm_SetSize(20)
  1147.             call ppm_TextIntoBox(box#id, 's')
  1148.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  1149.             call ppm_DrawLine(notex, zz+1.6, (notex+0.4), zz+1.6)
  1150.             call ppm_DrawLine(notex, zz+1.4, (notex+0.4), zz+1.4)
  1151.         end
  1152.         when nn=='F5'  then
  1153.         do
  1154.             yw = 1.12
  1155.             if al == 'n' then call aufltief()
  1156.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  1157.             call ppm_DrawLine(notex, zz+1.6, (notex+0.4), zz+1.6)
  1158.             call ppm_DrawLine(notex, zz+1.4, (notex+0.4), zz+1.4)
  1159.         end
  1160.         when nn=='E5'  then
  1161.         do
  1162.             yw = 1.22
  1163.             if al == 'n' then call aufltief()
  1164.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  1165.             call ppm_DrawLine(notex, zz+1.6, (notex+0.4), zz+1.6)
  1166.             call ppm_DrawLine(notex, zz+1.4, (notex+0.4), zz+1.4)
  1167.         end
  1168.         when nn=='Eb5'  then
  1169.         do
  1170.             yw = 1.22
  1171.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  1172.             call ppm_SetSize(20)
  1173.             call ppm_TextIntoBox(box#id, 'f')
  1174.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  1175.             call ppm_DrawLine(notex, zz+1.6, (notex+0.4), zz+1.6)
  1176.             call ppm_DrawLine(notex, zz+1.4, (notex+0.4), zz+1.4)
  1177.         end
  1178.         when nn=='D#5'  then
  1179.         do
  1180.             yw = 1.32
  1181.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  1182.             call ppm_SetSize(20)
  1183.             call ppm_TextIntoBox(box#id, 's')
  1184.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  1185.             call ppm_DrawLine(notex, zz+1.6, (notex+0.4), zz+1.6)
  1186.         end
  1187.         when nn=='D5'  then
  1188.         do
  1189.             yw = 1.32
  1190.             if al == 'n' then call aufltief()
  1191.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  1192.             call ppm_DrawLine(notex, zz+1.6, (notex+0.4), zz+1.6)
  1193.         end
  1194.         when nn=='Db5'  then
  1195.         do
  1196.             yw = 1.32
  1197.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  1198.             call ppm_SetSize(20)
  1199.             call ppm_TextIntoBox(box#id, 'f')
  1200.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  1201.             call ppm_DrawLine(notex, zz+1.6, (notex+0.4), zz+1.6)
  1202.         end
  1203.         when nn=='C#5'  then
  1204.         do
  1205.             yw = 1.42
  1206.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  1207.             call ppm_DrawLine(notex, zz+1.6, (notex+0.4), zz+1.6)
  1208.         end
  1209.  
  1210.         when nn=='C5'  then
  1211.         do
  1212.             yw = 1.42
  1213.             if al == 'n' then call aufltief()
  1214.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  1215.             call ppm_DrawLine(notex, zz+1.6, (notex+0.4), zz+1.6)
  1216.         end
  1217.  
  1218.         when nn=='B4'  then
  1219.         do
  1220.             yw = 1.52
  1221.             if al == 'n' then call aufltief()
  1222.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  1223.         end
  1224.  
  1225.         when nn=='Bb4'  then
  1226.         do
  1227.             yw = 1.52
  1228.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  1229.             call ppm_SetSize(20)
  1230.             call ppm_TextIntoBox(box#id, 'f')
  1231.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  1232.         end
  1233.  
  1234.         when nn=='A#4' then
  1235.         do
  1236.             yw = 1.62
  1237.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  1238.             call ppm_SetSize(20)
  1239.             call ppm_TextIntoBox(box#id, 's')
  1240.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  1241.         end
  1242.  
  1243.         when nn=='A4'  then
  1244.         do
  1245.             yw = 1.62
  1246.             if al == 'n' then call aufltief()
  1247.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  1248.         end
  1249.  
  1250.         when nn=='Ab4' then
  1251.         do
  1252.             yw = 1.62
  1253.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  1254.             call ppm_SetSize(20)
  1255.             call ppm_TextIntoBox(box#id, 'f')
  1256.             call ppm_DrawLine(notex, zz+1.8, (notex+0.4), zz+1.8)
  1257.         end
  1258.  
  1259.         when nn=='G#4' then
  1260.         do
  1261.             yw = 1.72
  1262.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  1263.             call ppm_SetSize(20)
  1264.             call ppm_TextIntoBox(box#id, 's')
  1265.         end
  1266.         when nn=='G4'  then
  1267.         do
  1268.             yw = 1.72
  1269.             if al == 'n' then call aufltief()
  1270.         end
  1271.         when nn=='Gb4' then
  1272.         do
  1273.             yw = 1.72
  1274.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  1275.             call ppm_SetSize(20)
  1276.             call ppm_TextIntoBox(box#id, 'f')
  1277.         end
  1278.         when nn=='F#4' then
  1279.         do
  1280.             yw = 1.82
  1281.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  1282.             call ppm_SetSize(20)
  1283.             call ppm_TextIntoBox(box#id, 's')
  1284.         end
  1285.         when nn=='F4'  then
  1286.         do
  1287.             yw = 1.82
  1288.             if al == 'n' then call aufltief()
  1289.         end
  1290.         when nn=='E#4' then
  1291.         do
  1292.             yw = 1.92
  1293.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  1294.             call ppm_SetSize(20)
  1295.             call ppm_TextIntoBox(box#id, 's')
  1296.         end
  1297.         when nn=='E4'  then
  1298.         do
  1299.             yw = 1.92
  1300.             if al == 'n' then call aufltief()
  1301.         end
  1302.         when nn=='Eb4' then
  1303.         do
  1304.             yw = 1.92
  1305.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  1306.             call ppm_SetSize(20)
  1307.             call ppm_TextIntoBox(box#id, 'f')
  1308.         end
  1309.         when nn=='D#4' then
  1310.         do
  1311.             yw = 2.02
  1312.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  1313.             call ppm_SetSize(20)
  1314.             call ppm_TextIntoBox(box#id, 's')
  1315.         end
  1316.         when nn=='D4'  then
  1317.         do
  1318.             yw = 2.02
  1319.             if al == 'n' then call aufltief()
  1320.         end
  1321.         when nn=='Db4' then
  1322.         do
  1323.             yw = 2.02
  1324.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  1325.             call ppm_SetSize(20)
  1326.             call ppm_TextIntoBox(box#id, 'f')
  1327.         end
  1328.         when nn=='C#4' then
  1329.         do
  1330.             yw = 2.12
  1331.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  1332.             call ppm_SetSize(20)
  1333.             call ppm_TextIntoBox(box#id, 's')
  1334.         end
  1335.         when nn=='C4'  then
  1336.         do
  1337.             yw = 2.12
  1338.             if al == 'n' then call aufltief()
  1339.         end
  1340.         when nn=='B3'  then
  1341.         do
  1342.             yw = 2.22
  1343.             if al == 'n' then call aufltief()
  1344.         end
  1345.         when nn=='Bb3'  then
  1346.         do
  1347.             yw = 2.22
  1348.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  1349.             call ppm_SetSize(20)
  1350.             call ppm_TextIntoBox(box#id, 'f')
  1351.         end
  1352.         when nn=='A#3' then
  1353.         do
  1354.             yw = 2.32
  1355.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  1356.             call ppm_SetSize(20)
  1357.             call ppm_TextIntoBox(box#id, 's')
  1358.         end
  1359.         when nn=='A3'  then
  1360.         do
  1361.             yw = 2.32
  1362.             if al == 'n' then call aufltief()
  1363.         end
  1364.  
  1365.         when nn=='Ab3' then
  1366.         do
  1367.             yw = 2.32
  1368.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  1369.             call ppm_SetSize(20)
  1370.             call ppm_TextIntoBox(box#id, 'f')
  1371.         end
  1372.         when nn=='G#3' then
  1373.         do
  1374.             yw = 2.42
  1375.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  1376.             call ppm_SetSize(20)
  1377.             call ppm_TextIntoBox(box#id, 's')
  1378.         end
  1379.         when nn=='G3'  then
  1380.         do
  1381.             yw = 2.42
  1382.             if al == 'n' then call aufltief()
  1383.         end
  1384.         when nn=='Gb3' then
  1385.         do
  1386.             yw = 2.42
  1387.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  1388.             call ppm_SetSize(20)
  1389.             call ppm_TextIntoBox(box#id, 'f')
  1390.         end
  1391.         when nn=='F#3' then
  1392.         do
  1393.             yw = 2.52
  1394.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  1395.             call ppm_SetSize(20)
  1396.             call ppm_TextIntoBox(box#id, 's')
  1397.         end
  1398.         when nn=='F3'  then
  1399.         do
  1400.             yw = 2.52
  1401.             if al == 'n' then call aufltief()
  1402.         end
  1403.         when nn=='E#3' then
  1404.         do
  1405.             yw = 2.62
  1406.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  1407.             call ppm_SetSize(20)
  1408.             call ppm_TextIntoBox(box#id, 's')
  1409.         end
  1410.         when nn=='E3'  then
  1411.         do
  1412.             yw = 2.62
  1413.             if al == 'n' then call aufltief()
  1414.         end
  1415.         when nn=='Eb3' then
  1416.         do
  1417.             yw = 2.62
  1418.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  1419.             call ppm_SetSize(20)
  1420.             call ppm_TextIntoBox(box#id, 'f')
  1421.         end
  1422.         when nn=='D#3' then
  1423.         do
  1424.             yw = 2.72
  1425.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  1426.             call ppm_SetSize(20)
  1427.             call ppm_TextIntoBox(box#id, 's')
  1428.         end
  1429.         when nn=='D3'  then
  1430.         do
  1431.             yw = 2.72
  1432.             if al == 'n' then call aufltief()
  1433.         end
  1434.         when nn=='Db3' then
  1435.         do
  1436.             yw = 2.72
  1437.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  1438.             call ppm_SetSize(20)
  1439.             call ppm_TextIntoBox(box#id, 'f')
  1440.         end
  1441.  
  1442.         when nn=='C#3' then
  1443.         do
  1444.             yw = 2.82
  1445.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  1446.             call ppm_SetSize(20)
  1447.             call ppm_TextIntoBox(box#id, 's')
  1448.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1449.         end
  1450.  
  1451.         when nn=='C3'  then
  1452.         do
  1453.             yw = 2.82
  1454.             if al == 'n' then call aufltief()
  1455.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1456.         end
  1457.  
  1458.         when nn=='B2'  then
  1459.         do
  1460.             yw = 2.92
  1461.             if al == 'n' then call aufltief()
  1462.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1463.         end
  1464.  
  1465.         when nn=='Bb2'  then
  1466.         do
  1467.             yw = 2.92
  1468.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  1469.             call ppm_SetSize(20)
  1470.             call ppm_TextIntoBox(box#id, 'f')
  1471.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1472.         end
  1473.  
  1474.         when nn=='A#2' then
  1475.         do
  1476.             yw = 3.02
  1477.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  1478.             call ppm_SetSize(20)
  1479.             call ppm_TextIntoBox(box#id, 's')
  1480.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1481.             call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1482.         end
  1483.  
  1484.         when nn=='A2'  then
  1485.         do
  1486.           yw = 3.02
  1487.             if al == 'n' then call aufltief()
  1488.           call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1489.           call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1490.         end
  1491.  
  1492.         when nn=='Ab2'  then
  1493.         do
  1494.           yw = 3.02
  1495.           box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  1496.           call ppm_SetSize(20)
  1497.           call ppm_TextIntoBox(box#id, 'f')
  1498.           call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1499.           call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1500.         end
  1501.  
  1502.         when nn=='G#2'  then
  1503.         do
  1504.             yw = 3.12
  1505.             box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  1506.             call ppm_SetSize(20)
  1507.             call ppm_TextIntoBox(box#id, 's')
  1508.             call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1509.             call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1510.         end
  1511.  
  1512.         when nn=='G2'  then
  1513.         do
  1514.           yw = 3.12
  1515.             if al == 'n' then call aufltief()
  1516.           call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1517.           call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1518.         end
  1519.  
  1520.         when nn=='Gb2'  then
  1521.         do
  1522.           yw = 3.12
  1523.           box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  1524.           call ppm_SetSize(20)
  1525.           call ppm_TextIntoBox(box#id, 'f')
  1526.           call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1527.           call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1528.         end
  1529.  
  1530.         when nn=='F#2'  then
  1531.         do
  1532.           yw = 3.22
  1533.           box#id = ppm_CreateBox(notex-0.23, yw+zz-0.15, 0.35, 0.75, 0)
  1534.           call ppm_SetSize(20)
  1535.           call ppm_TextIntoBox(box#id, 's')
  1536.           call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1537.           call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1538.           call ppm_DrawLine(notex, zz+3.4, (notex+0.4), zz+3.4)
  1539.         end
  1540.  
  1541.         when nn=='F2'  then
  1542.         do
  1543.           yw = 3.22
  1544.             if al == 'n' then call aufltief()
  1545.           call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1546.           call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1547.           call ppm_DrawLine(notex, zz+3.4, (notex+0.4), zz+3.4)
  1548.         end
  1549.  
  1550.         when nn=='E2'  then
  1551.         do
  1552.           yw = 3.32
  1553.             if al == 'n' then call aufltief()
  1554.           call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1555.           call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1556.           call ppm_DrawLine(notex, zz+3.4, (notex+0.4), zz+3.4)
  1557.         end
  1558.  
  1559.         when nn=='Eb2'  then
  1560.         do
  1561.           yw = 3.32
  1562.           box#id = ppm_CreateBox(notex-0.23, yw+zz-0.27, 0.35, 0.75, 0)
  1563.           call ppm_SetSize(20)
  1564.           call ppm_TextIntoBox(box#id, 'f')
  1565.           call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1566.           call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1567.         end
  1568.  
  1569.         when nn=='D2'  then
  1570.         do
  1571.           yw = 3.42
  1572.             if al == 'a' then call aufltief()
  1573.           call ppm_DrawLine(notex, zz+3, (notex+0.4), zz+3)
  1574.           call ppm_DrawLine(notex, zz+3.2, (notex+0.4), zz+3.2)
  1575.           call ppm_DrawLine(notex, zz+3.4, (notex+0.4), zz+3.4)
  1576.           call ppm_DrawLine(notex, zz+3.6, (notex+0.4), zz+3.6)
  1577.         end
  1578.  
  1579.         otherwise notenwert()
  1580.       end
  1581.  
  1582.  
  1583.         /* dimension of a notebox */
  1584.           notewidht = 0.64
  1585.           noteheight = 0.97
  1586.  
  1587.           firstbox = secondbox
  1588.           boxid = ppm_CreateBox(notex, yw+zz, notewidht, noteheight, 0)
  1589.           call ppm_SetSize(notepkt)
  1590.           call ppm_TextIntoBox(boxid, nw)
  1591.           bakx = notex
  1592.           notex = (notex + xw)
  1593.           if notex >=18.7 then
  1594.               do
  1595.                 notex = (2+(vz*0.175))
  1596.                 zz = zz + zdist
  1597.               end
  1598.           px = notex - 4
  1599.           py = zz-1
  1600.           if px < 0 then px = 0
  1601.           call ppm_SetPagePosition(px, py+2)
  1602.           secondbox=boxid
  1603.       end
  1604.    end
  1605. exit
  1606.  
  1607. auflhoch:
  1608. do
  1609.   Pbox = ppm_CreateBox(notex-0.34, yw+zz+0.07, 0.6, 1.2, 0)
  1610.   boxnm = ppm_DocNextBox(Pbox)
  1611.   call ppm_DeleteContents(boxnm)
  1612.   call ppm_ImportGraphic(boxnm, 'Genies:note_pause/naturalsng', Zeichen)
  1613.   return
  1614. end
  1615.  
  1616. aufltief:
  1617. do
  1618.   Pbox = ppm_CreateBox(notex-0.34, yw+zz-0.4, 0.6, 1.2, 0)
  1619.   boxnm = ppm_DocNextBox(Pbox)
  1620.   call ppm_DeleteContents(boxnm)
  1621.   call ppm_ImportGraphic(boxnm, 'Genies:note_pause/naturalsng', Zeichen)
  1622.   return
  1623. end
  1624.  
  1625. break_d:
  1626. break_e:
  1627. break_c:
  1628. halt:
  1629.     call exit_msg("User aborted Genie!")
  1630.  
  1631.  
  1632. exit_msg: procedure
  1633. do
  1634.     parse arg message
  1635.  
  1636.     if message ~= '' then
  1637.     call ppm_Inform(1,message,)
  1638.  
  1639.     call ppm_ClearStatus()
  1640.     call ppm_AutoUpdate(1)
  1641.     exit
  1642. end
  1643.  
  1644.